C1.LiveLinq Namespace > IndexedQueryExtensions Class > ToIndexed Method : ToIndexed<T>(IObservableSource<T>) Method |
'Declaration
Public Overloads Shared Function ToIndexed(Of T)( _ ByVal source As IObservableSource(Of T) _ ) As IIndexedSource(Of T)
public static IIndexedSource<T> ToIndexed<T>( IObservableSource<T> source )
Use this method to index and query your collection if that collection is your own custom implementation of the IObservableSource<T> interface.
Elements of the source collection aren't duplicated or copied to a new collection. This method just wraps the original collection in an C1.LiveLinq.Indexing.IIndexedSource<T>, enabling its indexing by using the change notification mechanism of IObservableSource<T>.
Note: Indexes created on the resulting C1.LiveLinq.Indexing.IIndexedSource<T> are owned by it and not by the original collection. Every ToIndexed() call creates a separate object that has its own separate indexes. Avoid calling ToIndexed() repeatedly for the same collection because it can increase the cost of maintaining indexes.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2